#ifndef CAPTURE_H
#define CAPTURE_H

#include "pcap/pcap.h"
#include "package.h"
#include "winsock2.h"
#pragma comment(lib,"ws2_32.lib")
#pragma comment(lib,"wpcap.lib")

class Capture
{
public:
	Capture();
	Capture(char *inface);
	~Capture();
	void StartCapture();
	void SetInterface(char* inface);
	void CaptureHttpPackage();
	
private:
	int GetGet(char *data,char *buff);
	int GetUrlPage(char *data,char *buff);
	int IsRealPage(char *data);
	int GetHost(char *data,char *buff);
	
private:
	bool bCapture;   
	char *net_interface;
	Packet cur_package;
};


#endif